import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/page/Login'
import index from '@/page/index'

// my code
import period_list from '@/page/period/period_list'
import flashover_list from '@/page/flashover/flashover_list'
import relation from '@/page/relation/relation'
import show_relation from '@/page/relation/show_relation'
import radio_relation from '@/page/relation/radio_relation'
import add_radio_relation from '@/page/relation/add_radio_relation'
import radio_list from '@/page/radio/radio_list'
import add_radio from '@/page/radio/add_radio'
import preview from '@/page/flashover/preview'
import interest_list from '@/page/interest/interest_list'
import add_interest from '@/page/interest/add_interest'
import sowing_list from '@/page/sowing/sowing_list'
import add_swiper from '@/page/sowing/add_swiper'
import interest_preview from '@/page/interest/preview'
import cruise_list from '@/page/cruise/cruise_list'
import cruise_preview from '@/page/cruise/preview'
import weekend_list from '@/page/weekend/weekend_list'
import add_weekend_list from '@/page/weekend/add_weekend_list'
import operator_list from '@/page/operator/operator_list'
import add_operator_list from '@/page/operator/add_operator_list'
import operatorder_list from '@/page/operatorder/operatorder_list'
import see_order from '@/page/operatorder/see_order'
import user from '@/page/user/user_list'
import customer_list from '@/page/customer/customer_list'
import close from '@/page/telephone/close'
import aboutwe from '@/page/about/aboutwe'
import employee_list from '@/page/employee/employee_list'
import menu_list from '@/page/set_up/menu_list'
import add_employee from '@/page/employee/add_employee'
import add_menu from '@/page/set_up/add_menu'
import steamer_list from '@/page/steamer/steamer_list'
import steamer from '@/page/steamer/steamer'
import music from '@/page/telephone/music'
import balance_record from '@/page/operator/balance_record'


Vue.use(Router)
export default new Router({
    routes: [{
        path: '/',
        name: 'index',
        component: index
    },
        {
            path: '/Login',
            name: 'Login',
            component: Login
        },
        {
            path: '/index',
            name: 'index',
            meta: {
                requireAuth: true,
            },
            component: index,
            children: [
                {
                    path: '/period/period_list',
                    component: period_list
                }, //期数管理
                {
                    path: '/flashover/flashover_list',
                    component: flashover_list
                }, // 闪购管理
                {
                    path: '/relation/relation',
                    component: relation
                }, //关联产品
                {
                    path: '/relation/show_relation',
                    component: show_relation
                }, //查看产品
                {
                    path: '/relation/radio_relation',
                    component: radio_relation
                }, //电台产品
                {
                    path: '/relation/add_radio_relation',
                    component: add_radio_relation
                }, //电台产品
                {
                    path: '/radio/radio_list',
                    component: radio_list
                }, //乐趣音频管理
                {
                    path: '/radio/add_radio',
                    component: add_radio
                }, //添加音频
                {
                    path: '/flashover/preview',
                    component: preview
                }, //预览
                {
                    path: '/interest/interest_list',
                    component: interest_list
                }, //非趣不可
                {
                    path: '/interest/add_interest',
                    component: add_interest
                }, //添加非趣不可
                {
                    path: '/sowing/sowing_list',
                    component: sowing_list
                }, //非趣不可
                {
                    path: '/steamer/steamer_list',
                    component: steamer_list
                }, // 闪购管理
                {
                    path: '/steamer/steamer',
                    component: steamer
                }, // 闪购管理
                {
                    path: '/sowing/add_swiper',
                    component: add_swiper
                }, // 轮播
                {
                    path: '/interest/preview',
                    component: interest_preview
                }, // 添加轮播
                {
                    path: '/cruise/cruise_list',
                    component: cruise_list
                }, // 游轮趣玩管理
                {
                    path: '/cruise/preview',
                    component: cruise_preview
                }, // 游轮趣玩 预览
                {
                    path: '/weekend/weekend_list',
                    component: weekend_list
                }, // 周末去哪管理
                {
                    path: '/weekend/add_weekend_list',
                    component: add_weekend_list
                }, // 添加周末去哪
                {
                    path: '/operator/operator_list',
                    component: operator_list
                }, // 合作商管理
                {
                    path: '/operator/add_operator_list',
                    component: add_operator_list
                }, // 添加合作商
                {
                    path: '/operatorder/operatorder_list',
                    component: operatorder_list
                }, // 合作商订单管理
                {
                    path: '/operatorder/see_order',
                    component: see_order
                }, // 查看订单
                {
                    path: '/user/user_list',
                    component: user
                }, // 查看订单
                {
                    path: '/customer/customer_list',
                    component: customer_list
                }, // 客服管理
                {
                    path: '/telephone/close',
                    component: close
                }, // 客服电话
               {
                    path: '/telephone/music',
                    component: music
                }, // 候场音乐
                {
                    path: '/about/aboutwe',
                    component: aboutwe
                }, // 关于我们
                {
                    path: '/employee/employee_list',
                    component: employee_list
                }, // 员工管理
                {
                    path: '/employee/add_employee',
                    component: add_employee
                }, // 添加员工
                {
                    path: '/set_up/menu_list',
                    component: menu_list
                }, // 菜单管理
                {
                    path: '/set_up/add_menu',
                    component: add_menu
                }, // 添加菜单
                {
                    path: '/operator/balance_record',
                    component: balance_record
                }, // 结算记录
            ]
        },
    ],
    scrollBehavior(to, from, savedPosition) {
        return {
            x: 0,
            y: 0
        }
    }
})
